<template>
  <div class="productlist">
    <router-link :to="{name:'product',query:list.id}">
      <img :src="list.pic" alt="">
      <span>{{list.title}}</span>
      <p>￥{{list.price}}</p>
    </router-link>
  </div>
</template>

<script>
import imgProduct from '../common/images/productlist.png'
export default {
  data () {
    return {
      imgProduct
    }
  },
  props: ['list']
}
</script>

<style>
.productlist{
  width: 3rem;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.productlist a{
  width: 3rem;
}
.productlist img{
  width: 3rem;
  display: block;
}
.productlist span{
  width: 2.7rem;
  font-size: 0.24rem;
  color: #222222;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
  display: block;
  margin-left: 0.3rem;
}
.productlist p{
  font-size: 0.15rem;
  color: #ff6325;
  margin-left: 0.3rem;
  margin-top: 0.15rem;
}
</style>
